package com.cnfangmao.masterdata.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cnfangmao.masterdata.dto.AccountDto;
import com.cnfangmao.masterdata.dto.AccountSearchDto;
import com.cnfangmao.masterdata.dto.ChangePasswordDto;
import com.cnfangmao.masterdata.dto.GeneralSearchDto;
import com.cnfangmao.masterdata.model.Account;

/**
 * <p>
 * 主数据中心用户 服务类
 * </p>
 *
 * @author chenxd
 * @since 2020-04-14
 */
public interface AccountService extends IService<Account> {

	Account findByUserCode(String userCode);

	Account findByUserName(String userName);

	boolean saveAccount(AccountDto dto, String createdBy);

	boolean update(AccountDto dto, String modifiedBy);

	boolean delete(String userId);

	IPage<Account> queryListAccount(GeneralSearchDto<AccountSearchDto> dto);
	
	boolean changePassword(ChangePasswordDto dto);

}
